<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>面向研究团队的参考文献管理与服务分布式系统</title>
		<meta name="keywords" content="面向研究团队的参考文献管理与服务分布式系统" />
		<meta name="description" content="面向研究团队的参考文献管理与服务分布式系统" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />

		<!-- basic styles -->

		<link href="css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="css/font-awesome.min.css" />

		<!--[if IE 7]>
		  <link rel="stylesheet" href="css/font-awesome-ie7.min.css" />
		<![endif]-->

		<!-- page specific plugin styles -->

		<link rel="stylesheet" href="css/jquery-ui-1.10.3.custom.min.css" />
		<link rel="stylesheet" href="css/chosen.css" />
		<link rel="stylesheet" href="css/datepicker.css" />
		<link rel="stylesheet" href="css/bootstrap-timepicker.css" />
		<link rel="stylesheet" href="css/daterangepicker.css" />
		<link rel="stylesheet" href="css/colorpicker.css" />

		<!-- fonts -->

		<!--<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" />-->

		<!-- ace styles -->

		<link rel="stylesheet" href="css/ace.min.css" />
		<link rel="stylesheet" href="css/ace-rtl.min.css" />
		<link rel="stylesheet" href="css/ace-skins.min.css" />

		<!--[if lte IE 8]>
		  <link rel="stylesheet" href="css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- ace settings handler -->

		<script src="js/ace-extra.min.js"></script>

		<script src="js/angular.min.js"></script>
		<script src="js/angular-cookies.min.js"></script>

		<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

		<!--[if lt IE 9]>
		<script src="js/html5shiv.js"></script>
		<script src="js/respond.min.js"></script>
		<![endif]-->
	</head>

	<body>
		<div class="navbar navbar-default" id="navbar">
		<script type="text/javascript">
				try {
					ace.settings.check('navbar', 'fixed')
				} catch(e) {}
			</script>
			<div class="navbar-container" id="navbar-container">
				<div class="navbar-header pull-left">
					<a href="#" class="navbar-brand">
						<small>
							<i class="icon-book"></i>
							面向研究团队的参考文献管理与服务分布式系统
						</small>
					</a>
					<!-- /.brand -->
				</div>
				<!-- /.navbar-header -->

				<div class="navbar-header pull-right" role="navigation">
					<ul class="nav ace-nav">

						<li class="light-blue">
							<a data-toggle="dropdown" href="#" class="dropdown-toggle">
								<img class="nav-user-photo" src="avatars/user.jpg" alt="Jason's Photo" />
								<span class="user-info">
									<small>欢迎,</small>
									登录
								</span>

								<i class="icon-caret-down"></i>
							</a>

							<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
								<li>
									<a href="#">
										<i class="icon-cog"></i> 设置
									</a>
								</li>

								<li>
									<a href="#">
										<i class="icon-user"></i> 简况
									</a>
								</li>

								<li class="divider"></li>

								<li>
									<a href="index.html">
										<i class="icon-off"></i> 登出
									</a>
								</li>
							</ul>
						</li>
					</ul>
					<!-- /.ace-nav -->
				</div>
				<!-- /.navbar-header -->
			</div>
			<!-- /.container -->
			
		</div>

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>

				<div class="sidebar" id="sidebar">
					<script type="text/javascript">
						try {
							ace.settings.check('sidebar', 'fixed')
						} catch(e) {}
					</script>

					<!-- #sidebar-shortcuts -->
					<ul class="nav nav-list">
						<li class="active">
							<a href="teamMember1.html">
								<i class="icon-dashboard"></i>
								<span class="menu-text"> 团队成员 </span>
							</a>
						</li>
						
					</ul>
					<!-- /.nav-list -->

					<div class="sidebar-collapse" id="sidebar-collapse">
						<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
					</div>

					<script type="text/javascript">
						try {
							ace.settings.check('sidebar', 'collapsed')
						} catch(e) {}
					</script>
				</div>

				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>

						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								<a href="#">主页</a>
							</li>

							<li>
								<a href="#">研究团队</a>
							</li>
							<li>
								<a href="#">团队成员</a>
							</li>
							<li class="active">添加成员</li>
						</ul><!-- .breadcrumb -->

						
					</div>

					<div class="page-content">
						<div class="page-header">
							<!--<h1>
								添加团队
								<small>
									<i class="icon-double-angle-right"></i>
									密码默认为团队号后8位
								</small>
							</h1>->
						</div><!-- /.page-header -->

						<div class="row">
							<div ng-app="myApp" ng-controller="myCtrl" class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->

								<form ng-submit="submitForm()"  class="form-horizontal" role="form">
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 用户号 </label>

										<div class="col-sm-9">
											<input ng-model="userNo" required="required" type="text" id="form-field-1" placeholder="用户号" class="col-xs-10 col-sm-5" />
										</div>
									</div>

									<div class="space-4"></div>

									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 用户名 </label>

										<div class="col-sm-9">
											<input ng-model="userName" required="required" type="text" id="form-field-2" placeholder="用户名" class="col-xs-10 col-sm-5" />
											<span class="help-inline col-xs-12 col-sm-7">
												
											</span>
										</div>
									</div>

									<div class="space-4"></div>

									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-input-readonly"> 用户团队号 </label>

										<div class="col-sm-9">
											
											<input ng-model="userTeamNo" readonly="readonly" required="required" type="text" id="form-field-2" placeholder="用户团队号" id="form-input-readonly" class="col-xs-10 col-sm-5" />
											
										</div>
									</div>

									<div class="space-4"></div>

									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-4">身份证号</label>

										<div class="col-sm-9">
											<input ng-model="iDNo" required="required" class="input-sm" type="number"  id="form-field-4" placeholder="身份证号" />
											

											
										</div>
									</div>

									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-5">手机号码</label>

										<div class="col-sm-9">
											<div class="clearfix">
												<input ng-model="userPhone" required="required" class="input-sm" type="number"  id="form-field-5" placeholder="手机号码" />
											</div>

										</div>
									</div>

									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right">Email</label>

										<div class="col-sm-9">
											
												<input ng-model="userEmail" required="required" class="input-sm"  type="email" id="form-field-icon-1" placeholder="Email" //>
												
										

											
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right">用户角色</label>

										<div class="col-sm-9">
											
												<input ng-model="userRole" required="required" class="input-sm"  type="text" id="form-field-icon-1" placeholder="用户角色" //>
												
										

											
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right">创建日期</label>

										<div class="col-sm-9">
											
												<input ng-model="date" required="required" class="input-sm"  type="text" id="form-field-icon-1" placeholder="用户角色" //>
												
										

											
										</div>
									</div>

									<div class="space-4"></div>

									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-6">注释</label>

										<div class="col-sm-9">
											<textarea ng-model="note" required="required" rows="3" class="col-xs-10 col-sm-5" placeholder="注释"></textarea>
										</div>
									</div>

									<div class="space-4"></div>

									

									<div class="clearfix form-actions">
										<div class="col-md-offset-3 col-md-9">
											<button class="btn btn-info" type="submit">
												<i class="icon-ok bigger-110"></i>
												提交
											</button>

											&nbsp; &nbsp; &nbsp;
											<button class="btn" type="reset">
												<i class="icon-undo bigger-110"></i>
												重置
											</button>
										</div>
									</div>

									<div class="hr hr-24"></div>

								</form>

								<div class="hr hr-18 dotted hr-double"></div>

								
								

								

								
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->

				<div class="ace-settings-container" id="ace-settings-container">
					<div class="btn btn-app btn-xs btn-warning ace-settings-btn" id="ace-settings-btn">
						<i class="icon-cog bigger-150"></i>
					</div>

					<div class="ace-settings-box" id="ace-settings-box">
						<div>
							<div class="pull-left">
								<select id="skin-colorpicker" class="hide">
									<option data-skin="default" value="#438EB9">#438EB9</option>
									<option data-skin="skin-1" value="#222A2D">#222A2D</option>
									<option data-skin="skin-2" value="#C6487E">#C6487E</option>
									<option data-skin="skin-3" value="#D0D0D0">#D0D0D0</option>
								</select>
							</div>
							<span>&nbsp; 换肤</span>
						</div>

						

						<div>
							<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-add-container" />
							<label class="lbl" for="ace-settings-add-container">
								&nbsp;居中
								<b></b>
							</label>
						</div>
					</div>
				</div><!-- /#ace-settings-container -->
			</div><!-- /.main-container-inner -->

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		

		<script type="text/javascript">
			window.jQuery || document.write("<script src='js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>
		<script src="js/jquery.cookie.js"></script>
		<script src="js/json2.js"></script>

	

		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="js/bootstrap.min.js"></script>
		<script src="js/typeahead-bs2.min.js"></script>

		<!-- page specific plugin scripts -->

		<!--[if lte IE 8]>
		  <script src="js/excanvas.min.js"></script>
		<![endif]-->

		<script src="js/jquery-ui-1.10.3.custom.min.js"></script>
		<script src="js/jquery.ui.touch-punch.min.js"></script>
		<script src="js/chosen.jquery.min.js"></script>
		<script src="js/fuelux/fuelux.spinner.min.js"></script>
		<script src="js/date-time/bootstrap-datepicker.min.js"></script>
		<script src="js/date-time/bootstrap-timepicker.min.js"></script>
		<script src="js/date-time/moment.min.js"></script>
		<script src="js/date-time/daterangepicker.min.js"></script>
		<script src="js/bootstrap-colorpicker.min.js"></script>
		<script src="js/jquery.knob.min.js"></script>
		<script src="js/jquery.autosize.min.js"></script>
		<script src="js/jquery.inputlimiter.1.3.1.min.js"></script>
		<script src="js/jquery.maskedinput.min.js"></script>
		<script src="js/bootstrap-tag.min.js"></script>

		<!-- ace scripts -->

		<script src="js/ace-elements.min.js"></script>
		<script src="js/ace.min.js"></script>

		<!-- inline scripts related to this page -->

		
		<script>
			var app = angular.module('myApp', ['ngCookies']);
			app.controller('myCtrl', function($scope, $http, $cookieStore) {
				/*var editUserNo = $cookieStore.get('editUserNo');*/
				var editUserNo = $.cookie('editUserNo');
					$http({
						method: 'GET',
						url: '/ma/user/queryUser/userNo/' + editUserNo
					}).then(function successCallback(response) {
						// 请求成功执行代码
						var data = response.data;

						if(data.length == 1) {
							$scope.userNo = data[0].userNo;
							$scope.userName = data[0].userName;
							$scope.userTeamNo = data[0].userTeamNo;
							$scope.iDNo = parseInt(data[0].iDNo);
							$scope.userPhone = parseInt(data[0].userPhone);
							$scope.userEmail = data[0].userEmail;
							$scope.userRole = data[0].userRole;
			
							$scope.date = data[0].date;
							$scope.note = data[0].note;

						} else {
							alert('数据获取失败');
						}
					}, function errorCallback(response) {
						// 请求失败执行代码 zxvbn/123
						alert("操作失败");
					});
				/*$scope.userTeamNo = $cookieStore.get("teamNo");*/
				$scope.submitForm = function() {
					var data = {
							'userNo': $scope.userNo,
							'userName': $scope.userName,
							'userTeamNo': $scope.userTeamNo,
							'iDNo': $scope.iDNo,
							'userPhone': $scope.userPhone,
							'userEmail': $scope.userEmail,
							'userRole': $scope.userRole,
							'date': $scope.date,
							'note': $scope.note
						};

					$http({
						method: 'PUT',
						data: data,
						url: '/ma/user'
					}).then(function successCallback(response) {
						// 请求成功执行代码
						var code = response.data.code;
						if(code == '0000') {
							alert("操作成功")
							window.location.href = 'teamMember1.html'; 
							
						} else {
							alert('操作失败');
						}
					}, function errorCallback(response) {
						// 请求失败执行代码 zxvbn/123
						alert("操作失败");
					});
				};
				
				
			})
			;
		</script>
	<!--<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>-->
</body>
</html>
